package com.pattern.deno;

import com.pattern.deno.component.Beverage;
import com.pattern.deno.component.concretecomponents.Espresso;
import com.pattern.deno.component.concretecomponents.HouseBlend;
import com.pattern.deno.decorator.concretedecorators.Milk;
import com.pattern.deno.decorator.concretedecorators.Mocha;
import com.pattern.deno.decorator.concretedecorators.Soy;

/**
 * @ClassName: StarBuzzCoffee
 * @Description:    测试coffee
 * @Date: 2020/8/28 14:27
 * @Author: Song JinGen
 */
public class StarBuzzCoffee {

    public static void main(String[] args) {
        Beverage espresso = new Espresso();
        System.out.println(espresso.getDescription() + "$" + espresso.cost());

        Beverage houseBlend = new HouseBlend();
        houseBlend = new Mocha(new Soy(new Milk(houseBlend)));
        System.out.println(houseBlend.getDescription() + "$" + houseBlend.cost());
    }
}
